﻿using System.Drawing;
using DevExpress.Utils;
using DevExpress.Utils.Drawing;
using DevExpress.XtraGrid.Drawing;

namespace Marmat.Forms.Views
{
    namespace GridControl
    {
        public class ColumnHeaderCustomDrawEventArgs : GridEventArgs
        {
            private Grid.ColumnHeaderCustomDrawEventArgs args;

            public ColumnHeaderCustomDrawEventArgs(Forms.GridControl gridControl, Grid.ColumnHeaderCustomDrawEventArgs args) : base(gridControl)
            {
                this.args = args;
            }

            /// <summary>
            /// 获取一个对象，该对象提供绘制列标题所需的信息。
            /// </summary>
            /// <returns></returns>
            public GridColumnInfoArgs Info
            {
                get
                {
                    return this.args.Info;
                }
            }
            // 
            // 摘要:
            // Gets the DevExpress.XtraGrid.Columns.GridColumn whose header is to be drawn.
            // Returns null if an "empty column header" is currently being painted.
            public Grid.Column Column
            {
                get
                {
                    return this.args.Column;
                }
            }

            public AppearanceObject Appearance
            {
                get
                {
                    return this.args.Appearance;
                }
            }

            public Rectangle Bounds
            {
                get
                {
                    return this.args.Bounds;
                }
            }

            public GraphicsCache Cache
            {
                get
                {
                    return this.args.Cache;
                }
            }

            public Graphics Graphics
            {
                get
                {
                    return this.args.Graphics;
                }
            }

            public bool Handled
            {
                get
                {
                    return this.args.Handled;
                }

                set
                {
                    this.args.Handled = value;
                }
            }

            public ObjectPainter Painter
            {
                get
                {
                    return this.args.Painter;
                }
            }

            public void DefaultDraw()
            {
                this.args.DefaultDraw();
            }
        }
    }
}